package com.ayh.campusfun.common.annotation.validators;

import com.ayh.campusfun.validators.PasswordValidators;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author ayh
 * @create 2021/3/26 0026 9:59
 * 密码验证注解
 */

@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE,ElementType.METHOD})
// 绑定验证密码类
@Constraint(validatedBy = PasswordValidators.class)
public @interface PasswordEqual {

    String message() default "password are equal!";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
